Handle NULL intp in test_increment_intp()
authorMartin Nordholts <martinn@src.gnome.org>
Sat, 30 Oct 2010 22:06:48 +0000 (00:06 +0200)
committerMartin Nordholts <martinn@src.gnome.org>
Sat, 30 Oct 2010 22:49:38 +0000 (00:49 +0200)
Support passing NULL for &int to gtk_test_display_button_window() so
we can use that function also when we are not interested in counting
clicks.

gtk/gtktestutils.c

index c2306feccb8ca8697a4f7b5dce337016ccffb11a..704674b3c1b0e74ef98b97ae43302b5290e4f16d 100644 (file)
@@ -544,7 +544,8 @@ try_main_quit (void)
 static int
 test_increment_intp (int *intp)
 {
-  *intp += 1;
+  if (intp != NULL)
+    *intp += 1;
   return 1; /* TRUE in case we're connected to event signals */
 }